#!/usr/bin/python
# -*- coding: UTF-8 -*-

import time
from UtilPackge import readExcel
from UtilPackge import Logger
from ProductPublishInfoWrite.BasicInfoWrite.TypeAttribute import typeAttributeWrite
from UtilPackge import sureVarType


def basicInfowrate(browser,filePath):

    settitleInfo(browser,filePath)

    typeAttributeWrite.allAttributeData(browser,filePath)

#填写标题
def settitleInfo(browser,filePath):
    time.sleep(5)

    sheetName = 'Titles'

    excelData = readExcel.readExceInfo(filePath,sheetName)
    titleInfo = excelData.get(0)[0]
    Logger.logger.info("商品的标题为："+titleInfo)

    browser.find_element_by_xpath("//*[@id='title']").send_keys(titleInfo)


